<?php
require_once('classes/Databases.class.php');

class TugasAkhir extends Databases{
  protected $sqlFile='com/tugas_akhir/bussines/tugasakhir.sql.php';
  public function __construct(){
    parent::__construct();
  }
  function getStatusTugasAkhir(){
    $result=$this->open($this->sqlQueries['get_status_ta'],array());
    return $result;
  }
  function getTopikTugasAkhir(){
    $result=$this->open($this->sqlQueries['get_topik_ta'],array());
    return $result;
  }
  
  function getDataComboTugasAkhir($mhsId){
    $result=$this->open($this->sqlQueries['get_data_combo_tugas_akhir'],array($mhsId));
   
    return $result;
  }
  
  function getDataTugasAkhirById($taId){
    $result=$this->open($this->sqlQueries['get_data_tugas_akhir_by_id'],array($taId));
    return $result;
  }
  
  function getDataTugasAkhirByMhsId($mhsId){
    $result=$this->open($this->sqlQueries['get_data_tugas_akhir_by_mhs_id'],array($mhsId));
    return $result;
  }
  function doAddTugasAkhir($taMhsId,$taTopikId,$taTopikLainnya,$taJudul,$taSemesterDaftar,$taStatusId){
    $result=$this->execute($this->sqlQueries['do_add_tugas_akhir'],array($taMhsId,$taTopikId,$taTopikLainnya,$taJudul,$taSemesterDaftar,$taStatusId));
    return $result;
  }
  function doUpdateTugasAkhir($taMhsId,$taTopikId,$taTopikLainnya,$taJudul,$taSemesterDaftar,$taStatusId,$taId){
    $result=$this->execute($this->sqlQueries['do_add_tugas_akhir'],array($taMhsId,$taTopikId,$taTopikLainnya,$taJudul,$taSemesterDaftar,$taStatusId,$taId));
    return $result;
  }
}
?>
